<table class="table table-hover table-bordered">
    <thead>
    <tr class="info">
        <th width="50"><input type="checkbox" onclick="javascript:selectall(this,'iselectquestions_1','ialreadyselectnumber_1');" autocomplete="off"></th>
        <th width="50">科目</th>
        <th width="60">试题类型</th>
        <th>试题内容</th>
    </tr>
    </thead>
    <tbody>
    {foreach name="questionList" item="v"}
    <tr>
        <td><input class="sbox" type="checkbox" name="ids[]" value="{$v.questionid}" onclick="javascript:selectQuestion(this)"></td>
        <td>{$v.subject_name}</td>
        <td>{$v.qtype_name}</td>
        <td>
            <a href="javascript:;" title="{$v.question|movehtml}">{$v.question|movehtml|subtext="30"}</a>
        </td>
    </tr>
    {/foreach}
    </tbody>
</table>
    {$questionPage|raw}
<script type="text/javascript">
        jQuery(function($) {
            var qtypeid = $("#qtypeid").val();
            var old_select_str = $("#iselectquestions_"+qtypeid+"").val();
            var old_select_arr = old_select_str.split(','); //字符串转数组
            $("#ajaxList table tr td .sbox").each(function(i){
                if(isInArray($(this).val(),old_select_arr)){
                    $(this).attr("checked","true");
                }
            });
        });
    // 点击分页触发的事件
    $(".pagination a").click(function(){
        url = $(this).attr('href');
        ajax_get_table('searchForm',url);
        return false;
    });

</script>